<?php echo "Current user logged in as <fb:name uid=\"$user_id\" />"; 
print_r(array_keys($me)); echo "<br>";	
foreach($education as &$el){echo "[education] " . $el . "<br>";}				
?>

	?>
	<img src="https://graph.facebook.com/<?php echo $uid; ?>/picture">
	<br>
	<?php

	//-------------
	<div id="fb-root"></div>
      <script src="http://connect.facebook.net/en_US/all.js">
      </script>
      <script>
         FB.init({ 
            appId:'127996350606219', cookie:true, 
            status:true, xfbml:true 
         });

         FB.ui({ method: 'feed', 
            message: 'Facebook for Websites is super-cool'});
      </script>
//--------------------------name-------------
<div id="fb-root"></div>
      <script src="http://connect.facebook.net/en_US/all.js">
      </script>
      <script>
FB.api(
  {
    method: 'fql.query',
    query: 'SELECT name FROM user WHERE uid=100002117900495'
  },
  function(response) {
    alert('Name is ' + response[0].name);
  }
);
</script>
//------------------------	friends
  <div id="fb-root"></div>
   <script src="http://connect.facebook.net/en_US/all.js">
   </script>
   <script>
     FB.init({ 
       appId:'127996350606219', cookie:true, 
       status:true, xfbml:true 
     });

     FB.ui({ method: 'apprequests', 
       message: 'Here is a new Requests dialog...'});
   </script>
//-----------------------------register2-------------------------------------
    <!--<div id="fb-root"></div>
      <script src="http://connect.facebook.net/en_US/all.js">
      </script-->
      <script>
         FB.init({ 
            appId:'127996350606219', cookie:true, 
            status:true, xfbml:true 
         });
      </script>
      <fb:login-button perms="email,user_birthday,friends_birthday,user_status,user_checkins">
         Login with Facebook
      </fb:login-button>
//---------------------------------register1----------------------------------
<!--	echo "[sessioon is null]. ";
	//$url = $facebook->getLoginUrl(array(
	//'canvas' => 1,
	//'fbconnect' => 0
	//));
	//echo "<script type='text/javascript'>top.location.href = '$url';</script>"; 	
	
//--------------------------------------------------friends info1-------------
		$friendsGen = $facebook->api('/me/friends');	
		$friends = $friendsGen['data'];	
		//print_r(array_keys($friends[0])); echo "<br>";			
		//echo "[friends] " . $friends['data'][0]['name'] . "<br />";				
		foreach($friends as &$fr)
		{	
			$birthday = "***";
			echo "<img src=\"https://graph.facebook.com/" 
			. $fr['id'] . "/picture\" title=\"" . $fr['name'] . "\"/>";
			echo " [name] " . $fr['name'] . ", [b]" . $birthday . "<br>";
		}
//-----------------------------------------------------------------------------		
